#include "include.h"

#include "LQ_Font.h"

unsigned char TFT2mode = 0;

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：lq_TFT2_delayms
@功能说明：不精确延时
@参数说明：@param ms ：延时时间（单位：ms）
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
static void lq_TFT2_delayms(unsigned short ms)
{
    volatile unsigned long i = 0;
    while (ms--)
    {
        for (i = 0; i < 15000; ++i)
        {
            __asm("NOP"); /* delay */
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：write_command
@功能说明：往指定寄存器中写数据
@参数说明：@param LCD_Reg：寄存器地址
@param LCD_RegValue：16位数据
@函数返回：无
@备    注：无
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void write_command(unsigned char LCD_Reg, unsigned int LCD_RegValue)
{
    TFT2SPI_Write_Cmd(LCD_Reg);
    TFT2SPI_Write_Byte(LCD_RegValue >> 8);
    TFT2SPI_Write_Byte(LCD_RegValue & 0xff);
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Init
@功能说明：TFT2初始化
@参数说明：@param type ： 0:横屏  1：竖屏
@函数返回：无
@备    注：如果修改管脚 需要修改初始化的管脚
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Init(void)
{
    //-----端口初始化----//
    PIN_InitConfig(TFT2SPI_CS, PIN_MODE_OUTPUT, 0);
    PIN_InitConfig(TFT2SPI_DC, PIN_MODE_OUTPUT, 0);
    PIN_InitConfig(TFT2SPI_RST, PIN_MODE_OUTPUT, 0);
    PIN_InitConfig(TFT2SPI_SCK, PIN_MODE_OUTPUT, 0);
    PIN_InitConfig(TFT2SPI_SDI, PIN_MODE_OUTPUT, 0);

    TFT2SPI_RST_L;
    lq_TFT2_delayms(50);
    TFT2SPI_RST_H;
    lq_TFT2_delayms(50);

    write_command(0xD0, 0x0003);
    write_command(0xEB, 0x0B00);
    write_command(0xEC, 0x000F);
    write_command(0xC7, 0x030F);
    write_command(0x01, 0x011C);

    write_command(0x08, 0x0808);
    write_command(0x0F, 0x0901);
    lq_TFT2_delayms(10);
    write_command(0x10, 0x0000);
    write_command(0x11, 0x1B41); // The register setting is suitable for VCI=2.8V
    lq_TFT2_delayms(120);
    write_command(0x12, 0x200E); // The register setting is suitable for VCI=2.8V
    write_command(0x13, 0x0052); // The register setting is suitable for VCI=2.8V
    write_command(0x14, 0x4B5C); // The register setting is suitable for VCI=2.8V
    write_command(0x30, 0x0000);
    write_command(0x31, 0x00DB);
    write_command(0x32, 0x0000);
    write_command(0x33, 0x0000);
    write_command(0x34, 0x00DB);
    write_command(0x35, 0x0000);
    write_command(0x02, 0x0100);
    write_command(0x03, 0x1030);
    write_command(0x36, 0x00AF); // Horizontal Window Address -1
    write_command(0x37, 0x0000); // Horizontal Window Address -2
    write_command(0x38, 0x00DB); // Vertical Window Address -1
    write_command(0x39, 0x0000); // Vertical Window Address -2
    write_command(0x20, 0x0000); // RAM Address Set 1
    write_command(0x21, 0x0000); // RAM Address Set 2

    if (USE_HORIZONTAL == 0) // ===== rotate 0 degree ===== //  屏排线与ＩＣ在下方OK
    {
        TFT2mode = 0;
        write_command(0x02, 0x0100);
        write_command(0x03, 0x1030);
        write_command(0x36, 175);
        write_command(0x37, 0);
        write_command(0x38, 219);
        write_command(0x39, 0);
        write_command(0x20, 0);
        write_command(0x21, 0);
    }
    else if (USE_HORIZONTAL == 1)
    {
        // ===== 顺时针rotate 90 degree =====
        // 　 屏排线与ＩＣ在左方 OK 20210522
        TFT2mode = 1;
        write_command(0x0001, 0x011C); // set SS GS
        write_command(0x0003, 0x1028); // Entry Mode (R03h) set GRAM write direction and BGR=1.
        write_command(0x36, 175);      // end of the window address area in horizontal direction.  be sure “00”h ≤ HSA[7:0]< HEA[7:0] ≤ “AF”h
        write_command(0x37, 0);        // start of the window address area in horizontal direction.
        write_command(0x38, 219);      // end of the window address area in vertical direction.  be sure “00”h ≤ VSA[7:0]< VEA[7:0] ≤ “DB”h.
        write_command(0x39, 0);        // start of the window address area in vertical direction.
        write_command(0x20, 175);      // 刷起始点
        write_command(0x21, 0);        //
    }
    else if (USE_HORIZONTAL == 2) //  俗称倒装使用
    {
        // =====顺时针 rotate 180 degree =====
        //   屏排线与ＩＣ在上方
        TFT2mode = 1;
        write_command(0x0001, 0x021C); // 0x001C
        write_command(0x0003, 0x10B0);
        write_command(0x36, 175);
        write_command(0x37, 0);
        write_command(0x38, 219);
        write_command(0x39, 0);
        write_command(0x20, 0);
        write_command(0x21, 219);
    }
    else if (USE_HORIZONTAL == 3)
    {
        // ===== 顺时针rotate 270 degree =====
        //   屏排线与ＩＣ在右方 OK 210522
        TFT2mode = 3;
        write_command(0x0001, 0x011C); // set SS GS   ok
        write_command(0x0003, 0x1018); // 1018   //ok
        write_command(0x36, 175);
        write_command(0x37, 0);
        write_command(0x38, 219);
        write_command(0x39, 0);
        write_command(0x20, 0);   // 刷起始点
        write_command(0x21, 219); //
    }

    TFT2SPI_Write_Cmd(0x22);
    write_command(0x50, 0x0000);
    write_command(0x51, 0x0705);
    write_command(0x52, 0x0C0A);
    write_command(0x53, 0x0401);
    write_command(0x54, 0x040C);
    write_command(0x55, 0x0608);
    write_command(0x56, 0x0000);
    write_command(0x57, 0x0104);
    write_command(0x58, 0x0E06);
    write_command(0x59, 0x060E);
    write_command(0x07, 0x1017);
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2delay_1us
@功能说明：简单延时函数
@参数说明：@param Del ：延时时间
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2delay_1us(unsigned int Del) //
{
    while (Del--)
    {
        __asm("NOP");
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Write_Cmd
@功能说明：写命令
@参数说明：@param cmd ：命令
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Write_Cmd(unsigned char cmd)
{
    unsigned char i;

    TFT2SPI_DC_L; // A0=0 ILI9163_A0=0;     //A0=0发送命令

    for (i = 0; i < 8; i++)
    {
        TFT2SPI_SCK_L;
        TFT2delay_1us(1); // SCK=0  ILI9163_SCK=0;
        if (cmd & 0x80)
        {
            TFT2SPI_SDI_H;
        } // SDI=1
        else
        {
            TFT2SPI_SDI_L;
        } // SDI=0
        TFT2SPI_SCK_H;
        TFT2delay_1us(1); // SCK=1  ILI9163_SCK = 1;
        cmd = (cmd << 1);
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Write_Byte
@功能说明：写字节
@参数说明：@param dat ：数据
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Write_Byte(unsigned char dat)
{
    unsigned char i;

    TFT2SPI_DC_H; // A0=1  ILI9163_A0=1;         //A0=1发送数据

    for (i = 0; i < 8; i++)
    {
        TFT2SPI_SCK_L;
        TFT2delay_1us(1); // SCK=0  ILI9163_SCK=0;
        if (dat & 0x80)
        {
            TFT2SPI_SDI_H;
        } // SDI=1
        else
        {
            TFT2SPI_SDI_L;
        } // SDI=0
        TFT2SPI_SCK_H;
        TFT2delay_1us(1); // SCK=1 ILI9163_SCK = 1;
        dat = (dat << 1);
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Write_Word
@功能说明：写半字
@参数说明：@param dat ：数据
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Write_Word(unsigned short dat)
{
    unsigned char i;

    TFT2SPI_DC_H; // A0=1  ILI9163_A0=1;

    for (i = 0; i < 16; i++)
    {
        TFT2SPI_SCK_L;
        TFT2delay_1us(1); // SCK=0  ILI9163_SCK=0;
        if (dat & 0x8000)
        {
            TFT2SPI_SDI_H;
        } // SDI=1
        else
        {
            TFT2SPI_SDI_L;
        } // SDI=0
        TFT2SPI_SCK_H;
        TFT2delay_1us(1); // SCK=1  ILI9163_SCK=1;
        dat <<= 1;
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Set_Pos
@功能说明：重新定位输入信息位置
@参数说明：@param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Set_Pos(unsigned char xs, unsigned char ys, unsigned char xe, unsigned char ye)
{
    if (TFT2mode == 0) // ===== rotate 0 degree ===== //  屏排线与ＩＣ在下方OK
    {

        write_command(0x02, 0x0100);
        write_command(0x03, 0x1030);
        write_command(0x36, xe);
        write_command(0x37, xs);
        write_command(0x38, ye);
        write_command(0x39, ys);
        write_command(0x20, xs);
        write_command(0x21, ys);
    }
    else if (TFT2mode == 1)
    {
        // ===== 顺时针rotate 90 degree =====
        // 　 屏排线与ＩＣ在左方 OK 20210522
        write_command(0x0001, 0x011C); // set SS GS
        write_command(0x0003, 0x1028); // Entry Mode (R03h) set GRAM write direction and BGR=1.
        write_command(0x36, 175 - ys); // end of the window address area in horizontal direction.  be sure “00”h ≤ HSA[7:0]< HEA[7:0] ≤ “AF”h
        write_command(0x37, 175 - ye); // start of the window address area in horizontal direction.
        write_command(0x38, xe);       // end of the window address area in vertical direction.  be sure “00”h ≤ VSA[7:0]< VEA[7:0] ≤ “DB”h.
        write_command(0x39, xs);       // start of the window address area in vertical direction.
        write_command(0x20, 175 - ye); // 刷起始点x
        write_command(0x21, xs);       // 刷起始点y
    }
    else if (TFT2mode == 2) //  俗称倒装使用
    {
        // =====顺时针 rotate 180 degree =====
        //   屏排线与ＩＣ在上方
        write_command(0x0001, 0x021C); // 0x001C
        write_command(0x0003, 0x10B0);
        write_command(0x36, 175 - xs);
        write_command(0x37, 175 - xe);
        write_command(0x38, 219 - ys);
        write_command(0x39, 219 - ye);
        write_command(0x20, 175 - xe);
        write_command(0x21, 219 - ye);
    }
    else if (TFT2mode == 3)
    {
        // ===== 顺时针rotate 270 degree =====
        //   屏排线与ＩＣ在右方 OK 2180514
        write_command(0x0001, 0x011C); // set SS GS   ok
        write_command(0x0003, 0x1018); // 1018   //ok
        write_command(0x36, ye);
        write_command(0x37, ys);
        write_command(0x38, 219 - xs);
        write_command(0x39, 219 - xe);
        write_command(0x20, ys);       // 刷起始点
        write_command(0x21, 219 - xs); //
    }

    TFT2SPI_Write_Cmd(0x22); // GRAM接收MCU数据或命令
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Addr_Rst
@功能说明：重置地址
@参数说明：无
@函数返回：无
@备    注：内部调用
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Addr_Rst(void)
{
    write_command(0x36, 0x00AF); // Horizontal Window Address -1
    write_command(0x37, 0x0000); // Horizontal Window Address -2
    write_command(0x38, 0x00DB); // Vertical Window Address -1
    write_command(0x39, 0x0000); // Vertical Window Address -2

    write_command(0x20, 0x0000); // RAM Address Set 1
    write_command(0x21, 0x0000); // RAM Address Set 2
    TFT2SPI_Write_Cmd(0x22);
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Fill_Area
@功能说明：填充指定区域
@参数说明：@param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@param color_dat ：颜色

@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Fill_Area(unsigned char xs, unsigned char ys, unsigned char xe, unsigned char ye, unsigned short color)
{
    unsigned int i, j;

    TFT2SPI_Set_Pos(xs, ys, xe, ye);
    for (i = 0; i < (xe - xs); i++)
    {
        for (j = 0; j < (ye - ys); j++)
        {
            TFT2SPI_Write_Word(color);
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_CLS
@功能说明：全屏显示单色画面
@参数说明：param color_dat ：颜色
@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_CLS(unsigned short color)
{
    unsigned int i, j;

    TFT2SPI_Addr_Rst();

    for (i = 0; i < TFT20W; i++) // 220
    {
        for (j = 0; j < TFT20H; j++)
        {
            TFT2SPI_Write_Word(color);
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Draw_Part
@功能说明：填充矩形区域
@参数说明：@param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@param color_dat ：颜色

@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Draw_Part(unsigned char xs, unsigned char ys, unsigned char xe, unsigned char ye, unsigned short color_dat)
{
    unsigned char i, j;

    TFT2SPI_Set_Pos(xs, ys, xe, ye);
    for (j = 0; j < (ye - ys + 1); j++)
    {
        for (i = 0; i < (xe - xs + 1); i++)
        {
            TFT2SPI_Write_Word(color_dat);
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Draw_Rectangle
@功能说明：画矩形边框
@参数说明：@param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@param color_dat ：颜色

@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Draw_Rectangle(unsigned char xs, unsigned char ys, unsigned char xe, unsigned char ye, unsigned short color_dat)
{
    TFT2SPI_Draw_Line(xs, ys, xs, ye, color_dat); // 画矩形左边
    TFT2SPI_Draw_Line(xe, ys, xe, ye, color_dat); // 画矩形右边
    TFT2SPI_Draw_Line(xs, ys, xe, ys, color_dat); // 画矩形上边
    TFT2SPI_Draw_Line(xs, ye, xe, ye, color_dat); // 画矩形下边
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Draw_Circle
@功能说明：画圆
@参数说明：@param x ：圆心x   (0-219)
@param y ：圆心y   (0-175)
@param r ：半径 (0-128)
@param color_dat ：颜色

@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Draw_Circle(unsigned char x, unsigned char y, unsigned char r, unsigned short color_dat)
{
    unsigned char dx, dy = r;

    if ((x >= r) && ((TFT20W - x) >= r) && (y >= r) && ((TFT20H - y) >= r)) // 确定所画圆在屏幕范围内，没有超出最外边，(暂不支持与屏幕边相交)
    {
        for (dx = 0; dx <= r; dx++)
        {
            while ((r * r + 1 - dx * dx) < (dy * dy))
                dy--;
            TFT2SPI_Draw_Dot(x + dx, y - dy, color_dat);
            TFT2SPI_Draw_Dot(x - dx, y - dy, color_dat);
            TFT2SPI_Draw_Dot(x - dx, y + dy, color_dat);
            TFT2SPI_Draw_Dot(x + dx, y + dy, color_dat);

            TFT2SPI_Draw_Dot(x + dy, y - dx, color_dat);
            TFT2SPI_Draw_Dot(x - dy, y - dx, color_dat);
            TFT2SPI_Draw_Dot(x - dy, y + dx, color_dat);
            TFT2SPI_Draw_Dot(x + dy, y + dx, color_dat);
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Draw_Line
@功能说明：画线
@参数说明：@param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@param color_dat ：颜色

@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Draw_Line(unsigned char xs, unsigned char ys, unsigned char xe, unsigned char ye, unsigned short color_dat)
{
    int i, ds;
    int dx, dy, inc_x, inc_y;
    int xerr = 0, yerr = 0; // 初始化变量

    if (xs == xe) // 如果是画垂直线则只需对竖直坐标计数
    {
        TFT2SPI_Set_Pos(xs, ys, xe, ye);
        for (i = 0; i < (ye - ys + 1); i++)
        {
            TFT2SPI_Write_Word(color_dat);
        }
    }
    else if (ys == ye) // 如果是水平线则只需要对水平坐标计数
    {
        TFT2SPI_Set_Pos(xs, ys, xe, ye);
        for (i = 0; i < (xe - xs + 1); i++)
        {
            TFT2SPI_Write_Word(color_dat);
        }
    }
    else // 如果是斜线，则重新计算，使用画点函数画出直线
    {
        dx = xe - xs; // 计算坐标增量
        dy = ye - ys;

        if (dx > 0)
            inc_x = 1; // 设置单步方向
        else
        {
            inc_x = -1;
            dx = -dx;
        }
        if (dy > 0)
            inc_y = 1; // 设置单步方向
        else
        {
            inc_y = -1;
            dy = -dy;
        }

        if (dx > dy)
        {
            ds = dx;
        } // 选取基本增量坐标轴
        else
        {
            ds = dy;
        }

        for (i = 0; i <= ds + 1; i++) // 画线输出
        {
            TFT2SPI_Draw_Dot(xs, ys, color_dat); // 画点
            xerr += dx;
            yerr += dy;
            if (xerr > ds)
            {
                xerr -= ds;
                xs += inc_x;
            }
            if (yerr > ds)
            {
                yerr -= ds;
                ys += inc_y;
            }
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Draw_Dot
@功能说明：画点
@参数说明：@param x ：横坐标
@param y ：纵坐标
@param color_dat ：颜色

@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Draw_Dot(unsigned char x, unsigned char y, unsigned short color_dat)
{
    TFT2SPI_Set_Pos(x, y, x, y);
    TFT2SPI_Write_Word(color_dat);
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Show_Pic
@功能说明：显示图片
@参数说明：@param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@param ppic ：图片数据
@函数返回：无
@备    注：起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Show_Pic(unsigned char xs, unsigned char ys, unsigned char xe, unsigned char ye, const unsigned char *ppic)
{
    unsigned int i, j, k = 0;

    TFT2SPI_Set_Pos(xs, ys, xe - 1, ye);
    for (i = 0; i < ye - ys; i++)
    {
        for (j = 0; j < xe - xs; j++)
        {
            TFT2SPI_Write_Word(((unsigned short)ppic[k]) << 8 | ppic[k + 1]);
            k++;
            k++;
        }
    }
}
/** 字库
字库码的引索
--------------------------------------------------------------
(0)  !(1)  "(2)  #(3)  $(4)  %(5)  &(6)  '(7)
((8)  )(9)  *(10) +(11) ,(12) -(13) .(14) /(15)
0(16) 1(17) 2(18) 3(19) 4(20) 5(21) 6(22) 7(23)
8(24) 9(25) :(26) ;(27) <(28) =(29) >(30) ?(31)
@(32) A(33) B(34) C(35) D(36) E(37) F(38) G(39)
H(40) I(41) J(42) K(43) L(44) M(45) N(46) O(47)
P(48) Q(49) R(50) S(51) T(52) U(53) V(54) W(55)
X(56) Y(57) Z(58) [(59) \(60) ](61) ^(62) _(63)
`(64) a(65) b(66) c(67) d(68) e(69) f(70) g(71)
h(72) i(73) j(74) k(75) l(76) m(77) n(78) o(79)
p(80) q(81) r(82) s(83) t(84) u(85) v(86) w(87)
x(88) y(89) z(90) {(91) |(92) }(93) ~(94)
--------------------------------------------------------------
字体:   8*6字体
取码规则:   低位在前, 列行扫描, 阴码(1-亮, 0-灭)
查表方法: 要显示的ASCII码-32就可以得到字库码的指针 */
const unsigned char Font2_code8[][6] = {
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},  // (0)
    {0x00, 0x00, 0x00, 0x4F, 0x00, 0x00},  //!(1)
    {0x00, 0x00, 0x07, 0x00, 0x07, 0x00},  //"(2)
    {0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14},  // #(3)
    {0x00, 0x24, 0x2A, 0x7F, 0x2A, 0x12},  //$(4)
    {0x00, 0x23, 0x13, 0x08, 0x64, 0x62},  //%(5)
    {0x00, 0x36, 0x49, 0x55, 0x22, 0x50},  //&(6)
    {0x00, 0x00, 0x05, 0x03, 0x00, 0x00},  //'(7)
    {0x00, 0x00, 0x1C, 0x22, 0x41, 0x00},  //((8)
    {0x00, 0x00, 0x41, 0x22, 0x1C, 0x00},  //)(9)
    {0x00, 0x14, 0x08, 0x3E, 0x08, 0x14},  //*(10)
    {0x00, 0x08, 0x08, 0x3E, 0x08, 0x08},  //+(11)
    {0x00, 0x00, 0x50, 0x30, 0x00, 0x00},  //,(12)
    {0x00, 0x08, 0x08, 0x08, 0x08, 0x08},  //-(13)
    {0x00, 0x00, 0x60, 0x60, 0x00, 0x00},  //.(14)
    {0x00, 0x20, 0x10, 0x08, 0x04, 0x02},  ///(15)
    {0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E},  // 0(16)
    {0x00, 0x00, 0x42, 0x7F, 0x40, 0x00},  // 1(17)
    {0x00, 0x42, 0x61, 0x51, 0x49, 0x46},  // 2(18)
    {0x00, 0x21, 0x41, 0x45, 0x4B, 0x31},  // 3(19)
    {0x00, 0x18, 0x14, 0x12, 0x7F, 0x10},  // 4(20)
    {0x00, 0x27, 0x45, 0x45, 0x45, 0x39},  // 5(21)
    {0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30},  // 6(22)
    {0x00, 0x01, 0x71, 0x09, 0x05, 0x03},  // 7(23)
    {0x00, 0x36, 0x49, 0x49, 0x49, 0x36},  // 8(24)
    {0x00, 0x06, 0x49, 0x49, 0x29, 0x1E},  // 9(25)
    {0x00, 0x00, 0x36, 0x36, 0x00, 0x00},  //:(26)
    {0x00, 0x00, 0x56, 0x36, 0x00, 0x00},  //;(27)
    {0x00, 0x08, 0x14, 0x22, 0x41, 0x00},  //<(28)
    {0x00, 0x14, 0x14, 0x14, 0x14, 0x14},  //=(29)
    {0x00, 0x00, 0x41, 0x22, 0x14, 0x08},  //>(30)
    {0x00, 0x02, 0x01, 0x51, 0x09, 0x06},  //?(31)
    {0x00, 0x32, 0x49, 0x79, 0x41, 0x3E},  //@(32)
    {0x00, 0x7E, 0x11, 0x11, 0x11, 0x7E},  // A(33)
    {0x00, 0x7F, 0x49, 0x49, 0x49, 0x3E},  // B(34)
    {0x00, 0x3E, 0x41, 0x41, 0x41, 0x22},  // C(35)
    {0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C},  // D(36)
    {0x00, 0x7F, 0x49, 0x49, 0x49, 0x41},  // E(37)
    {0x00, 0x7F, 0x09, 0x09, 0x09, 0x01},  // F(38)
    {0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A},  // G(39)
    {0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F},  // H(40)
    {0x00, 0x00, 0x41, 0x7F, 0x41, 0x00},  // I(41)
    {0x00, 0x20, 0x40, 0x41, 0x3F, 0x01},  // J(42)
    {0x00, 0x7F, 0x08, 0x14, 0x22, 0x41},  // K(43)
    {0x00, 0x7F, 0x40, 0x40, 0x40, 0x40},  // L(44)
    {0x00, 0x7F, 0x02, 0x04, 0x02, 0x7F},  // M(45)
    {0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F},  // N(46)
    {0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E},  // O(47)
    {0x00, 0x7F, 0x09, 0x09, 0x09, 0x06},  // P(48)
    {0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E},  // Q(49)
    {0x00, 0x7F, 0x09, 0x19, 0x29, 0x46},  // R(50)
    {0x00, 0x46, 0x49, 0x49, 0x49, 0x31},  // S(51)
    {0x00, 0x01, 0x01, 0x7F, 0x01, 0x01},  // T(52)
    {0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F},  // U(53)
    {0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F},  // V(54)
    {0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F},  // W(55)
    {0x00, 0x63, 0x14, 0x08, 0x14, 0x63},  // X(56)
    {0x00, 0x03, 0x04, 0x78, 0x04, 0x03},  // Y(57)
    {0x00, 0x61, 0x51, 0x49, 0x45, 0x43},  // Z(58)
    {0x00, 0x00, 0x7F, 0x41, 0x41, 0x00},  //[(59)
    {0x00, 0x15, 0x16, 0x7C, 0x16, 0x15},  //\(60)
    {0x00, 0x00, 0x41, 0x41, 0x7F, 0x00},  //](61)
    {0x00, 0x04, 0x02, 0x01, 0x02, 0x04},  //^(62)
    {0x00, 0x40, 0x40, 0x40, 0x40, 0x40},  //_(63)
    {0x00, 0x00, 0x01, 0x02, 0x04, 0x00},  //`(64)
    {0x00, 0x20, 0x54, 0x54, 0x54, 0x78},  // a(65)
    {0x00, 0x7F, 0x48, 0x44, 0x44, 0x38},  // b(66)
    {0x00, 0x38, 0x44, 0x44, 0x44, 0x20},  // c(67)
    {0x00, 0x38, 0x44, 0x44, 0x48, 0x7F},  // d(68)
    {0x00, 0x38, 0x54, 0x54, 0x54, 0x18},  // e(69)
    {0x00, 0x08, 0x7E, 0x09, 0x01, 0x02},  // f(70)
    {0x00, 0x0C, 0x52, 0x52, 0x52, 0x3E},  // g(71)
    {0x00, 0x7F, 0x08, 0x04, 0x04, 0x78},  // h(72)
    {0x00, 0x00, 0x44, 0x7D, 0x40, 0x00},  // i(73)
    {0x00, 0x20, 0x40, 0x44, 0x3D, 0x00},  // j(74)
    {0x00, 0x7F, 0x10, 0x28, 0x44, 0x00},  // k(75)
    {0x00, 0x00, 0x41, 0x7F, 0x40, 0x00},  // l(76)
    {0x00, 0x7E, 0x02, 0x0C, 0x02, 0x7C},  // m(77)
    {0x00, 0x7E, 0x04, 0x02, 0x02, 0x7C},  // n(78)
    {0x00, 0x38, 0x44, 0x44, 0x44, 0x38},  // o(79)
    {0x00, 0x7C, 0x14, 0x14, 0x14, 0x08},  // p(80)
    {0x00, 0x08, 0x14, 0x14, 0x18, 0x7C},  // q(81)
    {0x00, 0x7C, 0x08, 0x04, 0x04, 0x08},  // r(82)
    {0x00, 0x48, 0x54, 0x54, 0x54, 0x20},  // s(83)
    {0x00, 0x04, 0x3F, 0x44, 0x40, 0x20},  // t(84)
    {0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C},  // u(85)
    {0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C},  // v(86)
    {0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C},  // w(87)
    {0x00, 0x44, 0x28, 0x10, 0x28, 0x44},  // x(88)
    {0x00, 0x0C, 0x50, 0x50, 0x50, 0x3C},  // y(89)
    {0x00, 0x44, 0x64, 0x54, 0x4C, 0x44},  // z(90)
    {0x00, 0x00, 0x08, 0x36, 0x41, 0x00},  //{(91)
    {0x00, 0x00, 0x00, 0x7F, 0x00, 0x00},  //|(92)
    {0x00, 0x00, 0x41, 0x36, 0x08, 0x00},  //}(93)
    {0x00, 0x08, 0x04, 0x08, 0x10, 0x08},  //~(94)
    {0x00, 0x08, 0x08, 0x2A, 0x1C, 0x08},  // →(127)
    {0x00, 0x08, 0x1C, 0x2A, 0x08, 0x08},  // ←(128)
    {0x00, 0x04, 0x02, 0x7F, 0x02, 0x04},  // ↑(129)
    {0x00, 0x10, 0x20, 0x7F, 0x20, 0x10},  // ↓(130)
    {0x00, 0x1C, 0x2A, 0x32, 0x2A, 0x1C},  // 笑面(131)
    {0x00, 0x1C, 0x22, 0x44, 0x22, 0x1C}}; // 爱心(132)

/** 字库
字库码的引索
--------------------------------------------------------------
(0)  !(1)  "(2)  #(3)  $(4)  %(5)  &(6)  '(7)
((8)  )(9)  *(10) +(11) ,(12) -(13) .(14) /(15)
0(16) 1(17) 2(18) 3(19) 4(20) 5(21) 6(22) 7(23)
8(24) 9(25) :(26) ;(27) <(28) =(29) >(30) ?(31)
@(32) A(33) B(34) C(35) D(36) E(37) F(38) G(39)
H(40) I(41) J(42) K(43) L(44) M(45) N(46) O(47)
P(48) Q(49) R(50) S(51) T(52) U(53) V(54) W(55)
X(56) Y(57) Z(58) [(59) \(60) ](61) ^(62) _(63)
`(64) a(65) b(66) c(67) d(68) e(69) f(70) g(71)
h(72) i(73) j(74) k(75) l(76) m(77) n(78) o(79)
p(80) q(81) r(82) s(83) t(84) u(85) v(86) w(87)
x(88) y(89) z(90) {(91) |(92) }(93) ~(94)
--------------------------------------------------------------
字体:   GulimChe12 8*16字体
取码规则:   低位在前, 列行扫描, 阴码(1-亮, 0-灭)
查表方法: 要显示的ASCII码-32就可以得到字库码的指针 */
const unsigned char Font2_code16[][16] = {
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // (0)
    {0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00}, //!(1)
    {0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //"(3)
    {0x00, 0x00, 0x48, 0x48, 0x48, 0xFE, 0x24, 0x24, 0x24, 0x24, 0x24, 0x7F, 0x12, 0x12, 0x12, 0x00}, // #(4)
    {0x00, 0x10, 0x7C, 0x92, 0x92, 0x12, 0x14, 0x18, 0x30, 0x50, 0x90, 0x92, 0x92, 0x7C, 0x10, 0x00}, //$(5)
    {0x00, 0x00, 0x8C, 0x92, 0x52, 0x32, 0x2C, 0x10, 0x08, 0x68, 0x94, 0x92, 0x92, 0x60, 0x00, 0x00}, //%(6)
    {0x00, 0x00, 0x18, 0x24, 0x24, 0x24, 0x18, 0x98, 0xA4, 0xA2, 0x42, 0x42, 0xA2, 0x9C, 0x00, 0x00}, //&(7)
    {0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //'(8)
    {0x00, 0x20, 0x10, 0x08, 0x08, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x00}, //((9)
    {0x00, 0x04, 0x08, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0x08, 0x04, 0x00}, //)(10)
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x2A, 0x1C, 0x14, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //*(11)
    {0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xFE, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00}, //+(12)
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x00}, //,(13)
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //-(14)
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00}, //.(15)
    {0x00, 0x00, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x00, 0x00}, ///(16)
    {0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00}, // 0(17)
    {0x00, 0x00, 0x10, 0x1C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x3C, 0x42, 0x42, 0x40, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x02, 0x7E, 0x00, 0x00},
    {0x00, 0x00, 0x3C, 0x42, 0x42, 0x40, 0x40, 0x3C, 0x40, 0x40, 0x40, 0x42, 0x42, 0x3C, 0x00, 0x00},
    {0x00, 0x00, 0x60, 0x60, 0x50, 0x50, 0x48, 0x48, 0x44, 0x44, 0xFE, 0x40, 0x40, 0x40, 0x00, 0x00},
    {0x00, 0x00, 0x7E, 0x02, 0x02, 0x02, 0x3E, 0x42, 0x40, 0x40, 0x40, 0x42, 0x42, 0x3C, 0x00, 0x00},
    {0x00, 0x00, 0x3C, 0x42, 0x42, 0x02, 0x02, 0x3E, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00},
    {0x00, 0x00, 0x7E, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00},
    {0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x3C, 0x00, 0x00},
    {0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7C, 0x40, 0x40, 0x42, 0x42, 0x3C, 0x00, 0x00}, // 9(25)
    {0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00}, //:(26)
    {0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x00, 0x00}, //;(27)
    {0x00, 0x00, 0x00, 0x40, 0x30, 0x08, 0x06, 0x01, 0x06, 0x08, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00}, //<(28)
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, //=(29)
    {0x00, 0x00, 0x00, 0x02, 0x0C, 0x10, 0x60, 0x80, 0x60, 0x10, 0x0C, 0x02, 0x00, 0x00, 0x00, 0x00}, //>(30)
    {0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x40, 0x20, 0x10, 0x10, 0x10, 0x00, 0x10, 0x10, 0x00, 0x00}, //?(31)
    {0x00, 0x00, 0x38, 0x44, 0x82, 0xB2, 0xAA, 0xAA, 0xAA, 0xAA, 0xD2, 0x02, 0x84, 0x78, 0x00, 0x00}, //@(32)
    {0x00, 0x00, 0x10, 0x10, 0x10, 0x28, 0x28, 0x28, 0x44, 0x44, 0x7C, 0x82, 0x82, 0x82, 0x00, 0x00}, // A(33)
    {0x00, 0x00, 0x3E, 0x42, 0x82, 0x82, 0x42, 0x3E, 0x42, 0x82, 0x82, 0x82, 0x42, 0x3E, 0x00, 0x00},
    {0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x02, 0x02, 0x02, 0x02, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    {0x00, 0x00, 0x3E, 0x42, 0x42, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x42, 0x42, 0x3E, 0x00, 0x00},
    {0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x7E, 0x02, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00},
    {0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x7E, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00},
    {0x00, 0x00, 0x38, 0x44, 0x82, 0x02, 0x02, 0x02, 0xE2, 0x82, 0x82, 0x82, 0xC4, 0xB8, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0xFE, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x22, 0x1C, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x42, 0x22, 0x12, 0x0A, 0x06, 0x06, 0x0A, 0x12, 0x22, 0x42, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x7E, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x82, 0xC6, 0xC6, 0xAA, 0xAA, 0x92, 0x92, 0x92, 0x82, 0x82, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x86, 0x86, 0x8A, 0x8A, 0x92, 0x92, 0xA2, 0xA2, 0xC2, 0xC2, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    {0x00, 0x00, 0x3E, 0x42, 0x82, 0x82, 0x82, 0x42, 0x3E, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00},
    {0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xA2, 0x44, 0xB8, 0x00, 0x00},
    {0x00, 0x00, 0x3E, 0x42, 0x82, 0x82, 0x82, 0x42, 0x3E, 0x42, 0x82, 0x82, 0x82, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x7C, 0x82, 0x82, 0x02, 0x04, 0x18, 0x20, 0x40, 0x80, 0x82, 0x82, 0x7C, 0x00, 0x00},
    {0x00, 0x00, 0xFE, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7C, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x82, 0x82, 0x44, 0x44, 0x44, 0x28, 0x28, 0x28, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x92, 0x92, 0x92, 0x92, 0x92, 0xAA, 0xAA, 0xAA, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x10, 0x28, 0x28, 0x44, 0x44, 0x82, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x7E, 0x40, 0x20, 0x20, 0x10, 0x10, 0x08, 0x08, 0x04, 0x04, 0x02, 0x7E, 0x00, 0x00},
    {0x00, 0x78, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x78, 0x00},
    {0x00, 0x00, 0x92, 0x92, 0x92, 0xFF, 0x92, 0xAA, 0xAA, 0xAA, 0x44, 0x44, 0x44, 0x44, 0x00, 0x00},
    {0x00, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1E, 0x00},
    {0x00, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00},
    {0x00, 0x04, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x40, 0x7C, 0x42, 0x42, 0x42, 0xBC, 0x00, 0x00},
    {0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x3A, 0x46, 0x82, 0x82, 0x82, 0x82, 0x46, 0x3A, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x84, 0x02, 0x02, 0x02, 0x02, 0x84, 0x78, 0x00, 0x00},
    {0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xB8, 0xC4, 0x82, 0x82, 0x82, 0x82, 0xC4, 0xB8, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0xFE, 0x02, 0x02, 0x84, 0x78, 0x00, 0x00},
    {0x00, 0x00, 0x70, 0x08, 0x08, 0x08, 0x7E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x64, 0x42, 0x42, 0x42, 0x64, 0x58, 0x42, 0x3C, 0x00},
    {0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00},
    {0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x10, 0x10, 0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x00},
    {0x00, 0x00, 0x02, 0x02, 0x02, 0x42, 0x22, 0x12, 0x0A, 0x06, 0x0A, 0x12, 0x22, 0x42, 0x00, 0x00},
    {0x00, 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x92, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x46, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x44, 0x82, 0x82, 0x82, 0x82, 0x44, 0x38, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3A, 0x46, 0x82, 0x82, 0x82, 0x46, 0x3A, 0x02, 0x02, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB8, 0xC4, 0x82, 0x82, 0x82, 0xC4, 0xB8, 0x80, 0x80, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x42, 0x02, 0x0C, 0x30, 0x40, 0x42, 0x3C, 0x00, 0x00},
    {0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x7E, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x70, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x7C, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x92, 0x92, 0x92, 0xAA, 0x6C, 0x44, 0x44, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x44, 0x28, 0x10, 0x10, 0x28, 0x44, 0x82, 0x00, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x82, 0x44, 0x44, 0x28, 0x28, 0x10, 0x10, 0x0E, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x7E, 0x00, 0x00},
    {0x00, 0x60, 0x10, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x60, 0x00},
    {0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00},
    {0x00, 0x06, 0x08, 0x08, 0x08, 0x08, 0x08, 0x30, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x06, 0x00},
    {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
};

/* MDK AC6编译器不支持 GB3212编码的中文 因此会出现警告 不影响正常使用 忽略即可 */
/** 简单的汉字字库 */
const unsigned char hanzi2_Idx[] =
    {
        "北京龙邱丘智能科技淘宝店液晶单片机智能车器人启动中电压量不足请稍候，！：℃攻击娱乐模式普通格斗对话俯卧撑倒立握手敬礼跳舞蹈运动蓝精灵太极街舞温度—"};

/** 16*16 简单的汉字字库*/
const unsigned char hanzi216x16[] = {
    // 列行式 14*16
    0x04, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x44, 0x04, 0x48, 0x7C, 0x50, 0x04, 0x60, 0x04, 0x40,
    0x04, 0x40, 0x04, 0x40, 0x04, 0x40, 0x04, 0x42, 0x1C, 0x42, 0xE4, 0x42, 0x44, 0x3E, 0x04, 0x00, // 北,0
    0x02, 0x00, 0x01, 0x00, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10,
    0x10, 0x10, 0x1F, 0xF0, 0x01, 0x00, 0x11, 0x10, 0x11, 0x08, 0x21, 0x04, 0x45, 0x04, 0x02, 0x00, // 京,1
    0x04, 0x20, 0x04, 0x10, 0x04, 0x10, 0x04, 0x00, 0xFF, 0xFE, 0x04, 0x80, 0x04, 0x88, 0x04, 0x88,
    0x04, 0x90, 0x08, 0xA0, 0x08, 0xC0, 0x10, 0x82, 0x11, 0x82, 0x22, 0x82, 0x44, 0x7E, 0x80, 0x00, // 龙,2
    0x00, 0x00, 0x03, 0x3E, 0x3C, 0x22, 0x20, 0x24, 0x20, 0x24, 0x20, 0x28, 0x3F, 0xA4, 0x22, 0x24,
    0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x34, 0x27, 0xA8, 0xF8, 0x20, 0x40, 0x20, 0x00, 0x20, // 邱,3
    0x00, 0x10, 0x00, 0x78, 0x1F, 0x80, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x1F, 0xFC,
    0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0xFF, 0xFE, 0x00, 0x00, // 丘,4
    0x20, 0x00, 0x3E, 0x7C, 0x48, 0x44, 0x08, 0x44, 0xFF, 0x44, 0x14, 0x44, 0x22, 0x7C, 0x40, 0x00,
    0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, // 智,5
    0x10, 0x40, 0x24, 0x44, 0x42, 0x48, 0xFF, 0x70, 0x01, 0x40, 0x00, 0x42, 0x7E, 0x42, 0x42, 0x3E,
    0x42, 0x00, 0x7E, 0x44, 0x42, 0x48, 0x42, 0x70, 0x7E, 0x40, 0x42, 0x42, 0x4A, 0x42, 0x44, 0x3E, // 能,6
    0x08, 0x10, 0x1D, 0x10, 0xF0, 0x90, 0x10, 0x90, 0x10, 0x10, 0xFD, 0x10, 0x10, 0x90, 0x38, 0x90,
    0x34, 0x10, 0x50, 0x1E, 0x53, 0xF0, 0x90, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, // 科,7
    0x10, 0x20, 0x10, 0x20, 0x10, 0x20, 0x13, 0xFE, 0xFC, 0x20, 0x10, 0x20, 0x10, 0x20, 0x15, 0xFC,
    0x18, 0x84, 0x30, 0x88, 0xD0, 0x48, 0x10, 0x50, 0x10, 0x20, 0x10, 0x50, 0x51, 0x88, 0x26, 0x06, // 技,8
    0x01, 0x00, 0x21, 0x00, 0x11, 0xFC, 0x12, 0x04, 0x85, 0x04, 0x41, 0xE4, 0x42, 0x84, 0x10, 0x84,
    0x17, 0xF4, 0x20, 0x84, 0xE2, 0xA4, 0x22, 0xA4, 0x23, 0xE4, 0x20, 0x04, 0x20, 0x28, 0x00, 0x10, // 淘,9
    0x02, 0x00, 0x01, 0x00, 0x7F, 0xFE, 0x40, 0x02, 0x80, 0x04, 0x00, 0x00, 0x7F, 0xFC, 0x01, 0x00,
    0x01, 0x00, 0x01, 0x00, 0x3F, 0xF8, 0x01, 0x00, 0x01, 0x20, 0x01, 0x10, 0xFF, 0xFE, 0x00, 0x00, // 宝,10
    0x01, 0x00, 0x00, 0x80, 0x3F, 0xFE, 0x20, 0x80, 0x20, 0x80, 0x20, 0x80, 0x20, 0xFC, 0x20, 0x80,
    0x20, 0x80, 0x27, 0xF8, 0x24, 0x08, 0x24, 0x08, 0x44, 0x08, 0x44, 0x08, 0x87, 0xF8, 0x04, 0x08, // 店,11
    0x00, 0x80, 0x20, 0x40, 0x17, 0xFE, 0x11, 0x20, 0x81, 0x20, 0x42, 0x3C, 0x42, 0x44, 0x16, 0x64,
    0x12, 0x94, 0x23, 0x48, 0xE2, 0x48, 0x22, 0x30, 0x22, 0x20, 0x22, 0x50, 0x22, 0x88, 0x03, 0x06, // 液,12
    0x0F, 0xE0, 0x08, 0x20, 0x08, 0x20, 0x0F, 0xE0, 0x08, 0x20, 0x08, 0x20, 0x0F, 0xE0, 0x00, 0x00,
    0x7E, 0xFC, 0x42, 0x84, 0x42, 0x84, 0x7E, 0xFC, 0x42, 0x84, 0x42, 0x84, 0x7E, 0xFC, 0x42, 0x84, // 晶,13
    0x10, 0x10, 0x08, 0x20, 0x04, 0x40, 0x3F, 0xF8, 0x21, 0x08, 0x21, 0x08, 0x3F, 0xF8, 0x21, 0x08,
    0x21, 0x08, 0x3F, 0xF8, 0x01, 0x00, 0x01, 0x00, 0xFF, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, // 单,14
    0x00, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x10, 0x40, 0x1F, 0xFC, 0x10, 0x00, 0x10, 0x00,
    0x10, 0x00, 0x1F, 0xE0, 0x10, 0x20, 0x10, 0x20, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, // 片,15
    0x10, 0x00, 0x11, 0xF0, 0x11, 0x10, 0x11, 0x10, 0xFD, 0x10, 0x11, 0x10, 0x31, 0x10, 0x39, 0x10,
    0x55, 0x10, 0x55, 0x10, 0x91, 0x10, 0x11, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12, 0x0E, 0x14, 0x00, // 机,16
    0x20, 0x00, 0x3E, 0x7C, 0x48, 0x44, 0x08, 0x44, 0xFF, 0x44, 0x14, 0x44, 0x22, 0x7C, 0x40, 0x00,
    0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, // 智,17
    0x10, 0x40, 0x24, 0x44, 0x42, 0x48, 0xFF, 0x70, 0x01, 0x40, 0x00, 0x42, 0x7E, 0x42, 0x42, 0x3E,
    0x42, 0x00, 0x7E, 0x44, 0x42, 0x48, 0x42, 0x70, 0x7E, 0x40, 0x42, 0x42, 0x4A, 0x42, 0x44, 0x3E, // 能,18
    0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x7F, 0xFC, 0x04, 0x00, 0x09, 0x00, 0x11, 0x00, 0x21, 0x00,
    0x3F, 0xF8, 0x01, 0x00, 0x01, 0x00, 0xFF, 0xFE, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, // 车,19
    0x00, 0x00, 0x3E, 0x7C, 0x22, 0x44, 0x22, 0x44, 0x3E, 0x7C, 0x01, 0x20, 0x01, 0x10, 0xFF, 0xFE,
    0x02, 0x80, 0x0C, 0x60, 0x30, 0x18, 0xC0, 0x06, 0x3E, 0x7C, 0x22, 0x44, 0x22, 0x44, 0x3E, 0x7C, // 器,20
    0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x80, 0x02, 0x80,
    0x04, 0x40, 0x04, 0x40, 0x08, 0x20, 0x08, 0x20, 0x10, 0x10, 0x20, 0x08, 0x40, 0x04, 0x80, 0x02, // 人,21
    0x01, 0x00, 0x00, 0x80, 0x1F, 0xFC, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x1F, 0xFC, 0x10, 0x00,
    0x10, 0x00, 0x10, 0x00, 0x17, 0xFC, 0x24, 0x04, 0x24, 0x04, 0x44, 0x04, 0x87, 0xFC, 0x04, 0x04, // 启,22
    0x00, 0x40, 0x00, 0x40, 0x7C, 0x40, 0x00, 0x40, 0x01, 0xFC, 0x00, 0x44, 0xFE, 0x44, 0x20, 0x44,
    0x20, 0x44, 0x20, 0x84, 0x48, 0x84, 0x44, 0x84, 0xFD, 0x04, 0x45, 0x04, 0x02, 0x28, 0x04, 0x10, // 动,23
    0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x3F, 0xF8, 0x21, 0x08, 0x21, 0x08, 0x21, 0x08,
    0x21, 0x08, 0x21, 0x08, 0x3F, 0xF8, 0x21, 0x08, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, // 中,24
    0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x3F, 0xF8, 0x21, 0x08, 0x21, 0x08, 0x21, 0x08, 0x3F, 0xF8,
    0x21, 0x08, 0x21, 0x08, 0x21, 0x08, 0x3F, 0xF8, 0x21, 0x0A, 0x01, 0x02, 0x01, 0x02, 0x00, 0xFE, // 电,25
    0x00, 0x00, 0x3F, 0xFE, 0x20, 0x00, 0x20, 0x80, 0x20, 0x80, 0x20, 0x80, 0x20, 0x80, 0x2F, 0xFC,
    0x20, 0x80, 0x20, 0x80, 0x20, 0x90, 0x20, 0x88, 0x20, 0x88, 0x40, 0x80, 0x5F, 0xFE, 0x80, 0x00, // 压,26
    0x00, 0x00, 0x1F, 0xF0, 0x10, 0x10, 0x1F, 0xF0, 0x10, 0x10, 0xFF, 0xFE, 0x00, 0x00, 0x1F, 0xF0,
    0x11, 0x10, 0x1F, 0xF0, 0x11, 0x10, 0x1F, 0xF0, 0x01, 0x00, 0x1F, 0xF0, 0x01, 0x00, 0x7F, 0xFC, // 量,27
    0x00, 0x00, 0x7F, 0xFC, 0x00, 0x80, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x03, 0x40, 0x05, 0x20,
    0x09, 0x10, 0x11, 0x08, 0x21, 0x04, 0x41, 0x04, 0x81, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, // 不,28
    0x00, 0x00, 0x1F, 0xF0, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x1F, 0xF0, 0x01, 0x00,
    0x01, 0x00, 0x11, 0x00, 0x11, 0xF8, 0x11, 0x00, 0x29, 0x00, 0x25, 0x00, 0x43, 0xFE, 0x80, 0x00, // 足,29
    0x00, 0x40, 0x40, 0x40, 0x27, 0xFC, 0x20, 0x40, 0x03, 0xF8, 0x00, 0x40, 0xE7, 0xFE, 0x20, 0x00,
    0x23, 0xF8, 0x22, 0x08, 0x23, 0xF8, 0x22, 0x08, 0x2B, 0xF8, 0x32, 0x08, 0x22, 0x28, 0x02, 0x10, // 请,30
    0x08, 0x20, 0x1D, 0x24, 0xF0, 0xA4, 0x10, 0xA8, 0x10, 0x20, 0xFD, 0xFC, 0x11, 0x04, 0x31, 0x04,
    0x39, 0xFC, 0x55, 0x04, 0x55, 0x04, 0x91, 0xFC, 0x11, 0x04, 0x11, 0x04, 0x11, 0x14, 0x11, 0x08, // 稍,31
    0x10, 0x00, 0x13, 0xF8, 0x10, 0x08, 0x28, 0x08, 0x2F, 0xFE, 0x69, 0x00, 0x69, 0x00, 0xAB, 0xF8,
    0x2C, 0x40, 0x28, 0x40, 0x2F, 0xFE, 0x28, 0x40, 0x28, 0xA0, 0x21, 0x10, 0x22, 0x08, 0x2C, 0x06, // 候,32
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x18, 0x00, 0x30, 0x00, 0x00, 0x00, // ，,33
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x0E, 0x00,
    0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, // ！,34
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, // ：,35
    0x60, 0x00, 0x91, 0xF4, 0x96, 0x0C, 0x6C, 0x04, 0x08, 0x04, 0x18, 0x00, 0x18, 0x00, 0x18, 0x00,
    0x18, 0x00, 0x18, 0x00, 0x18, 0x00, 0x08, 0x00, 0x0C, 0x04, 0x06, 0x08, 0x01, 0xF0, 0x00, 0x00, // ℃,36
    0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0xFF, 0xC0, 0x18, 0xFF, 0x19, 0x8C, 0x1B, 0xCC, 0x18, 0xCC,
    0x18, 0xCC, 0x18, 0x78, 0x18, 0x78, 0x1F, 0x30, 0xF8, 0x78, 0x60, 0xCC, 0x01, 0x86, 0xFF, 0xFF, // 攻,36
    0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x3F, 0xFC, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0xFF, 0xFF,
    0x01, 0x80, 0x01, 0x80, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x31, 0x8C, 0x3F, 0xFC, 0xFF, 0xFF, // 击,37
    0x30, 0x00, 0x33, 0xFC, 0x33, 0x0C, 0x33, 0x0C, 0xFF, 0xFC, 0x6C, 0x00, 0x6C, 0x00, 0x6F, 0xFC,
    0xCC, 0x60, 0x6C, 0x60, 0x3F, 0xFF, 0x18, 0x60, 0x3C, 0xF0, 0x6D, 0x98, 0xC3, 0x0C, 0xFF, 0xFF, // 娱,38
    0x00, 0x30, 0x00, 0xF8, 0x1F, 0x80, 0x18, 0x00, 0x19, 0x80, 0x31, 0x80, 0x31, 0x80, 0x3F, 0xFE,
    0x01, 0x80, 0x0D, 0xB0, 0x0D, 0x98, 0x19, 0x8C, 0x31, 0x86, 0x61, 0x86, 0x07, 0x80, 0xFF, 0xFF, // 乐,39
    0x19, 0x98, 0x19, 0x98, 0x1F, 0xFE, 0x19, 0x98, 0xFE, 0x00, 0x1B, 0xFC, 0x3B, 0x0C, 0x3F, 0xFC,
    0x7F, 0x0C, 0x7B, 0xFC, 0xD8, 0x60, 0x1F, 0xFE, 0x18, 0xF0, 0x19, 0x98, 0x1B, 0x0C, 0xFF, 0xFF, // 模,40
    0x00, 0x6C, 0x00, 0x66, 0x00, 0x66, 0x00, 0x60, 0xFF, 0xFF, 0x00, 0x60, 0x00, 0x60, 0x3F, 0x60,
    0x0C, 0x60, 0x0C, 0x60, 0x0C, 0x30, 0x0C, 0x33, 0x0F, 0x9B, 0x7C, 0x0F, 0x30, 0x07, 0xFF, 0xFF, // 式,41
    0x0C, 0x30, 0x06, 0x60, 0x7F, 0xFE, 0x06, 0x60, 0x36, 0x6C, 0x1E, 0x78, 0xFF, 0xFF, 0x00, 0x00,
    0x1F, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x1F, 0xF8, 0x18, 0x18, 0x18, 0x18, 0x1F, 0xF8, 0x18, 0x18, // 普0
    0x00, 0x00, 0x67, 0xFC, 0x30, 0x18, 0x31, 0xF0, 0x00, 0x60, 0x07, 0xFE, 0xF6, 0x66, 0x36, 0x66,
    0x37, 0xFE, 0x36, 0x66, 0x36, 0x66, 0x37, 0xFE, 0x36, 0x66, 0x36, 0x7E, 0x7E, 0x0C, 0xCF, 0xFF, // 通1
    0x18, 0xC0, 0x18, 0xC0, 0x18, 0xFC, 0x19, 0x8C, 0xFF, 0x98, 0x1E, 0xF0, 0x38, 0x60, 0x3C, 0xF0,
    0x7F, 0x9C, 0x7B, 0x07, 0xDF, 0xFC, 0x19, 0x8C, 0x19, 0x8C, 0x19, 0x8C, 0x19, 0xFC, 0x19, 0x8C, // 格2
    0x00, 0x60, 0x06, 0x60, 0x03, 0x60, 0x03, 0x60, 0x18, 0x60, 0x0C, 0x60, 0x0C, 0x60, 0x00, 0x60,
    0x00, 0xFF, 0x7F, 0xE0, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, 0x00, 0x60, // 斗3
    0x00, 0x18, 0x00, 0x18, 0x00, 0x18, 0x7F, 0x18, 0x03, 0xFF, 0x03, 0x18, 0x36, 0x18, 0x1E, 0xD8,
    0x0C, 0x78, 0x0C, 0x78, 0x1E, 0x18, 0x1B, 0x18, 0x33, 0x18, 0x60, 0x18, 0x00, 0x78, 0x00, 0x30, // 对4
    0x00, 0x0C, 0x30, 0x3E, 0x19, 0xF0, 0x18, 0x30, 0x00, 0x30, 0x03, 0xFF, 0xF8, 0x30, 0x18, 0x30,
    0x18, 0x30, 0x19, 0xFE, 0x19, 0x86, 0x19, 0x86, 0x1F, 0x86, 0x1D, 0x86, 0x19, 0xFE, 0x01, 0x86, // 话5
    0x18, 0x60, 0x18, 0x30, 0x1F, 0xFF, 0x36, 0x00, 0x36, 0xCC, 0x76, 0xCC, 0x77, 0x8C, 0xF7, 0xFF,
    0x37, 0x8C, 0x37, 0xEC, 0x37, 0xBC, 0x37, 0xBC, 0x3D, 0x8C, 0x3D, 0x8C, 0x39, 0xBC, 0x31, 0x98, // 俯,42
    0x00, 0x30, 0x7F, 0xF0, 0x6C, 0x30, 0x6C, 0x30, 0x6C, 0x30, 0x7F, 0xB8, 0x61, 0xBC, 0x61, 0xB6,
    0x61, 0xB3, 0x7F, 0xB3, 0x6C, 0x30, 0x6C, 0x30, 0x6C, 0x30, 0x7F, 0xF0, 0x00, 0x30, 0x00, 0x30, // 卧,43
    0x19, 0xB6, 0x18, 0xFC, 0x1B, 0xFF, 0x1B, 0x03, 0xFE, 0xFC, 0x18, 0xCC, 0x18, 0xFC, 0x1E, 0x0E,
    0x1D, 0xF8, 0x38, 0x30, 0xF9, 0xFE, 0x18, 0x30, 0x1B, 0xFF, 0x18, 0x30, 0x78, 0xF0, 0x30, 0x60, // 撑,44
    0x18, 0x06, 0x18, 0x06, 0x1F, 0xE6, 0x33, 0x1E, 0x33, 0x1E, 0x76, 0xDE, 0x77, 0xFE, 0xF1, 0x9E,
    0x31, 0x9E, 0x37, 0xFE, 0x31, 0x9E, 0x31, 0x9E, 0x31, 0xE6, 0x3F, 0x06, 0x36, 0x1E, 0x30, 0x0C, // 倒,45
    0x03, 0x00, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
    0x0C, 0x30, 0x0C, 0x30, 0x06, 0x60, 0x06, 0x60, 0x06, 0xC0, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, // 立,46
    0x30, 0x00, 0x33, 0xFE, 0x33, 0x06, 0x33, 0x06, 0xFF, 0xFE, 0x33, 0x00, 0x33, 0xFE, 0x3F, 0x60,
    0x3B, 0xCC, 0xF3, 0xFE, 0x33, 0x36, 0x33, 0x30, 0x37, 0xFE, 0x36, 0x30, 0xFC, 0x30, 0x7B, 0xFF, // 握,47
    0x00, 0x18, 0x00, 0xFC, 0x3F, 0x80, 0x01, 0x80, 0x01, 0x80, 0x3F, 0xFC, 0x01, 0x80, 0x01, 0x80,
    0x01, 0x80, 0xFF, 0xFF, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x07, 0x80, 0x03, 0x00, // 手,48
    0x33, 0x30, 0x33, 0x30, 0xFF, 0xF0, 0x33, 0x3F, 0x60, 0x66, 0x7F, 0xE6, 0x61, 0xE6, 0xC1, 0xF6,
    0x7F, 0xBC, 0x67, 0xBC, 0x67, 0x98, 0x7F, 0x98, 0x67, 0xBC, 0x01, 0xBC, 0x0F, 0x66, 0x06, 0xC3, // 敬,49
    0x30, 0xC0, 0x18, 0xC0, 0x18, 0xC0, 0xFC, 0xC0, 0x0C, 0xC0, 0x18, 0xC0, 0x18, 0xC0, 0x3C, 0xC0,
    0x7E, 0xC0, 0xDE, 0xC0, 0x18, 0xC0, 0x18, 0xC6, 0x18, 0xC6, 0x18, 0xC6, 0x18, 0x7E, 0x18, 0x00, // 礼,50
    0x00, 0x78, 0x7E, 0x78, 0x66, 0x78, 0x67, 0xFB, 0x66, 0xFE, 0x7E, 0x7C, 0x18, 0x78, 0x18, 0x7C,
    0x18, 0xFE, 0x7F, 0xFB, 0x78, 0x78, 0x78, 0x78, 0x78, 0xDB, 0x7E, 0xDB, 0xF1, 0x9B, 0x03, 0x0F, // 跳,51
    0x18, 0x00, 0x3F, 0xFE, 0x6F, 0xF0, 0x0F, 0xF0, 0x7F, 0xFE, 0x0F, 0xF0, 0x0F, 0xF0, 0x7F, 0xFE,
    0x18, 0x18, 0x18, 0x18, 0x3F, 0xFE, 0x63, 0x18, 0x1E, 0xD8, 0x0C, 0xFF, 0x38, 0x18, 0xE0, 0x18, // 舞,52
    0xFF, 0xE1, 0x82, 0x1F, 0xBB, 0xDD, 0xBA, 0xED, 0xBB, 0x6B, 0x83, 0x7F, 0xEF, 0xDF, 0xEE, 0x31,
    0xEE, 0xFD, 0xA2, 0xFD, 0xAE, 0x31, 0xAE, 0xFD, 0xAE, 0xFD, 0xA2, 0xFD, 0x1E, 0x01, 0xFE, 0xFD, // 蹈,53
    0x00, 0x00, 0x33, 0xFC, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x07, 0xFE, 0xF8, 0x60, 0x18, 0xC0,
    0x19, 0x98, 0x1B, 0x0C, 0x1F, 0xFE, 0x1B, 0x06, 0x18, 0x00, 0x3C, 0x00, 0x67, 0xFF, 0x00, 0x00, // 运,54
    0x00, 0x60, 0x00, 0x60, 0x7E, 0x60, 0x00, 0x60, 0x01, 0xFE, 0x00, 0x66, 0xFF, 0x66, 0x30, 0x66,
    0x30, 0x66, 0x30, 0xC6, 0x6C, 0xC6, 0x66, 0xC6, 0xFF, 0x86, 0x67, 0x86, 0x03, 0x3C, 0x06, 0x18, // 动,55
    0x08, 0x20, 0x08, 0x20, 0xFF, 0xFE, 0x08, 0x20, 0x04, 0x80, 0x24, 0x80, 0x24, 0xFC, 0x24, 0xA0,
    0x25, 0x10, 0x00, 0x00, 0x3F, 0xF8, 0x24, 0x48, 0x24, 0x48, 0x24, 0x48, 0xFF, 0xFE, 0x00, 0x00, // 蓝,0
    0x10, 0x20, 0x10, 0x20, 0x95, 0xFE, 0x54, 0x20, 0x58, 0xFC, 0x10, 0x20, 0xFD, 0xFE, 0x30, 0x00,
    0x38, 0xFC, 0x54, 0x84, 0x54, 0xFC, 0x90, 0x84, 0x10, 0xFC, 0x10, 0x84, 0x10, 0x94, 0x10, 0x88, // 精,1
    0x00, 0x00, 0x3F, 0xF8, 0x00, 0x08, 0x00, 0x08, 0x1F, 0xF8, 0x00, 0x08, 0x00, 0x08, 0x3F, 0xF8,
    0x01, 0x00, 0x11, 0x10, 0x11, 0x10, 0x22, 0xA0, 0x04, 0x40, 0x08, 0x20, 0x30, 0x18, 0xC0, 0x06, // 灵,2
    0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0xFF, 0xFE, 0x01, 0x00, 0x01, 0x00,
    0x02, 0x80, 0x02, 0x80, 0x04, 0x40, 0x04, 0x40, 0x0A, 0x20, 0x11, 0x10, 0x21, 0x08, 0xC0, 0x06, // 太,3
    0x10, 0x00, 0x13, 0xFC, 0x10, 0x84, 0x10, 0x88, 0xFC, 0x88, 0x10, 0x90, 0x30, 0x9C, 0x38, 0x84,
    0x55, 0x44, 0x55, 0x44, 0x91, 0x28, 0x11, 0x28, 0x12, 0x10, 0x12, 0x28, 0x14, 0x44, 0x11, 0x82, // 极,4
    0x11, 0x00, 0x11, 0x00, 0x27, 0xDC, 0x41, 0x00, 0x81, 0x00, 0x17, 0xC0, 0x20, 0x3E, 0x61, 0x08,
    0xA1, 0x08, 0x27, 0xC8, 0x21, 0x08, 0x21, 0x08, 0x21, 0xC8, 0x2E, 0x08, 0x24, 0x28, 0x20, 0x10, // 街,5
    0x10, 0x00, 0x3F, 0xFC, 0x4A, 0xA0, 0x0A, 0xA0, 0x7F, 0xFC, 0x0A, 0xA0, 0x0A, 0xA0, 0x7F, 0xFC,
    0x10, 0x10, 0x10, 0x10, 0x3E, 0xFC, 0x42, 0x10, 0x14, 0x90, 0x08, 0xFE, 0x30, 0x10, 0xC0, 0x10, // 舞,6
    0x00, 0x00, 0x23, 0xF8, 0x12, 0x08, 0x12, 0x08, 0x83, 0xF8, 0x42, 0x08, 0x42, 0x08, 0x13, 0xF8,
    0x10, 0x00, 0x27, 0xFC, 0xE4, 0xA4, 0x24, 0xA4, 0x24, 0xA4, 0x24, 0xA4, 0x2F, 0xFE, 0x00, 0x00, // 温,0
    0x01, 0x00, 0x00, 0x80, 0x3F, 0xFE, 0x22, 0x20, 0x22, 0x20, 0x3F, 0xFC, 0x22, 0x20, 0x22, 0x20,
    0x23, 0xE0, 0x20, 0x00, 0x2F, 0xF0, 0x24, 0x10, 0x42, 0x20, 0x41, 0xC0, 0x86, 0x30, 0x38, 0x0E, // 度,1
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // [空格] ,
};

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P6X8(6*8字体)
@功能说明：液晶字符输出
@参数说明： @param x: 0 - 20 (行)
@param y: 0 - 19 (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16 内部调用
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P6X8(unsigned char x, unsigned char y, unsigned char c_dat, unsigned short word_color, unsigned short back_color)
{
    unsigned char i, j;

    TFT2SPI_Set_Pos(x * 6, y * 8, (x + 1) * 6 - 1, (y + 1) * 8 - 1); // 定位字符显示区域

    for (j = 0; j < 8; j++)
    {
        for (i = 0; i < 6; i++)
        {
            if ((Font2_code8[c_dat - 32][i]) & (0x01 << j))
                TFT2SPI_Write_Word(word_color);
            else
                TFT2SPI_Write_Word(back_color);
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P8X8(8*8字体)
@功能说明：液晶字符输出
@参数说明： @param x: 0 - 15 (行)
@param y: 0 - 19 (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16 内部调用
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P8X8(unsigned char x, unsigned char y, unsigned char c_dat, unsigned short word_color, unsigned short back_color)
{
    unsigned char i, j;

    TFT2SPI_Set_Pos(x * 8, y * 8, (x + 1) * 8 - 1, (y + 1) * 8 - 1); // 定位字符显示区域

    for (j = 0; j < 8; j++)
    {
        TFT2SPI_Write_Word(back_color);
        for (i = 0; i < 6; i++)
        {
            if ((Font2_code8[c_dat - 32][i]) & (0x01 << j))
                TFT2SPI_Write_Word(word_color);
            else
                TFT2SPI_Write_Word(back_color);
        }
        TFT2SPI_Write_Word(back_color);
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P8X16(8*16字体)
@功能说明：液晶字符输出
@参数说明： @param x: 0 - 15 (行)
@param y: 0 - 9  (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16 内部调用
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P8X16(unsigned char x, unsigned char y, unsigned char c_dat, unsigned short word_color, unsigned short back_color)
{
    unsigned char i, j;

    TFT2SPI_Set_Pos(x * 8, y * 16, (x + 1) * 8 - 1, (y + 1) * 16 - 1); // 定位字符显示区域

    for (j = 0; j < 16; j++)
    {
        for (i = 0; i < 8; i++)
        {
            if ((Font2_code16[c_dat - 32][j]) & (0x01 << i))
                TFT2SPI_Write_Word(word_color);
            else
                TFT2SPI_Write_Word(back_color);
        }
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P6X8Str(6*8字体)
@功能说明：液晶字符串输出
@参数说明： @param x: 0 - 20 (行)
@param y: 0 - 19 (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P6X8Str(unsigned char x, unsigned char y, char *s_dat, unsigned short word_color, unsigned short back_color)
{
    while (*s_dat)
        TFT2SPI_P6X8(x++, y, *s_dat++, word_color, back_color);
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P8X8Str(8*8字体)
@功能说明：液晶字符串输出
@参数说明： @param x: 0 - 15 (行)
@param y: 0 - 19 (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P8X8Str(unsigned char x, unsigned char y, char *s_dat, unsigned short word_color, unsigned short back_color)
{
    while (*s_dat)
        TFT2SPI_P8X8(x++, y, *s_dat++, word_color, back_color);
}
/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P8X16Str(8*16字体)
@功能说明：液晶字符串输出
@参数说明： @param x: 0 - 15 (行)
@param y: 0 - 9  (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P8X16Str(unsigned char x, unsigned char y, char *s_dat, unsigned short word_color, unsigned short back_color)
{
    while (*s_dat)
        TFT2SPI_P8X16(x++, y, *s_dat++, word_color, back_color);
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_P16x16Str(16*16字体)
@功能说明：液晶汉字字符串输出
@参数说明： @param x: 0 - 7  (行)
@param y: 0 - 9  (列)
@param word_color: 字体颜色
@param back_color: 背景颜色
@函数返回：无
@备    注：屏幕左上为 （0，0）,显示颜色uint16
@          汉字只能是字库里的 字库没有的需要自行添加
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_P16x16Str(unsigned char x, unsigned char y, unsigned char *s_dat, unsigned short word_color, unsigned short back_color)
{
    unsigned char wm = 0, ii = 0, i, j;
    int adder = 1;

    while (s_dat[ii] != '\0')
    {
        wm = 0;
        adder = 1;
        while (hanzi2_Idx[wm] > 127)
        {
            if (hanzi2_Idx[wm] == (uint8)s_dat[ii])
            {
                if (hanzi2_Idx[wm + 1] == s_dat[ii + 1])
                {
                    adder = wm * 16;
                    break;
                }
            }
            wm += 2;
        }

        if (adder != 1) // 显示汉字
        {
            TFT2SPI_Set_Pos(x * 16, y * 16, (x + 1) * 16 - 1, (y + 1) * 16 - 1); // 定位字符显示区域
            for (j = 0; j < 32; j++)
            {
                for (i = 0; i < 8; i++)
                {
                    if ((hanzi216x16[adder]) & (0x80 >> i))
                        TFT2SPI_Write_Word(word_color);
                    else
                        TFT2SPI_Write_Word(back_color);
                }
                adder += 1;
            }
        }
        else // 显示空白字符
        {
        }
        // y+=1;//左右方向
        x += 1; // 上下方向
        ii += 2;
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：TFT2SPI_Show_Pic2
@功能说明：显示图片
@参数说明： @param xs ：起始x
@param ys ：起始y
@param xe ：结束x
@param ys ：结束y
@param ppic ：图片数据
@函数返回：无
@备    注：屏幕左上为 （0，0）起始、终止横坐标(0-219)，纵坐标(0-175),显示颜色uint16
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Show_Pic2(unsigned char xs, unsigned char ys, unsigned char w, unsigned char h, const unsigned char *ppic)
{
    unsigned int i;
    TFT2SPI_Set_Pos(xs, ys, xs + w - 1, ys + h);
    for (i = 0; i < w * h; i++)
    {
        TFT2SPI_Write_Word((ppic[2 * i] << 8) + (ppic[2 * i + 1])); // 高位在前，且两个数据组合成一个16位数据表示像素值
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：void TFT2SPI_Show_Battery_Icon(void);
@功能说明：显示电池图标
@参数说明: 无
@函数返回：无
@备    注：无
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Show_Battery_Icon(void)
{
    TFT2SPI_Show_Pic2(138, 2, 20, 10, gImage_Battery_S); // 显示电池图标20*10像素
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：void TFT2SPI_Show_Title(void);
@功能说明：显示标签
@参数说明: 无
@函数返回：无
@备    注：无
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Show_Title(void)
{
    TFT2SPI_Show_Pic2(0, 0, 92, 28, gImage_title2);
    TFT2SPI_Draw_Line(0, 24, 160, 24, U16_BLACK); // 补齐分割线
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：void TFT2SPI_Road(void);
@功能说明：显示灰度数据
@参数说明: @param xs ： 显示图像横坐标开始位置
@param ys ： 显示图像纵坐标开始位置

@函数返回：无
@备    注：屏幕左上为 （0，0）
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Show_Logo(unsigned char xs, unsigned char ys)
{
    TFT2SPI_Show_Pic2(xs, ys, 160, 54, gImage_lo); // 80,gImage_ftflogo);  //
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：void TFT2SPI_Road(void);
@功能说明：显示灰度数据
@参数说明： @param high_start ： 显示图像开始位置
@param wide_start ： 显示图像开始位置
@param high ： 显示图像高度
@param wide ： 显示图像宽度
@param Pixle： 显示图像数据地址
@函数返回：无
@备    注：屏幕左上为 （0，0）
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_Road(unsigned char high_start, unsigned char wide_start, unsigned char high, unsigned char wide, unsigned char *Pixle)
{
    unsigned long i;
    /* 设置显示范围 */
    TFT2SPI_Set_Pos(wide_start, high_start, wide_start - 1 + wide, high_start - 1 + high);
    unsigned short color;
    unsigned long temp = high * wide;
    /* 显示图像 */
    for (i = 0; i < temp; i++)
    {

        /* 将灰度转化为 RGB565 */
        color = (Pixle[i] >> 3) << 11;
        color |= (Pixle[i] >> 2) << 5;
        color |= Pixle[i] >> 3;
        /* 显示 */
        TFT2SPI_Write_Word(color);
    }
}

/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：void TFT2SPI_BinRoad(void);
@功能说明：显示二值化数据
@参数说明： @param high_start ： 显示图像开始位置
@param wide_start ： 显示图像开始位置
@param high ： 显示图像高度
@param wide ： 显示图像宽度
@param Pixle： 显示图像数据地址
@函数返回：无
@备    注：屏幕左上为 （0，0）
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void TFT2SPI_BinRoad(unsigned char high_start, unsigned char wide_start, unsigned char high, unsigned char wide, unsigned char *Pixle)
{
    unsigned long i;
    /* 设置显示范围 */
    TFT2SPI_Set_Pos(wide_start, high_start, wide_start - 1 + wide, high_start - 1 + high);

    unsigned long temp = high * wide;
    /* 显示图像 */
    for (i = 0; i < temp; i++)
    {
        if (Pixle[i])
        {
            /* 显示 */
            TFT2SPI_Write_Word(0xffff);
        }
        else
        {
            /* 显示 */
            TFT2SPI_Write_Word(0);
        }
    }
}
/*!
 * @brief    液晶字符串输出
 *
 * @param    x:   (行)
 * @param    y:   (列)
 * @param    word_color: 字体颜色
 * @param    back_color: 背景颜色
 * @param    size :字号 可选12 16 24 32
 * @return   无
 *
 * @note     汉字只能是字库里的 字库没有的需要自行添加
 *
 * @see      TFTSPI_P16x16Str(1, 1, "123456", u16YELLOW, u16RED);
 *
 */
void TFT2SPI_ShowStr(unsigned char x, unsigned char y, char *s_dat,
                     unsigned short fc, unsigned short pc, unsigned char size)
{
    if (size == 12)
        TFT2SPI_P6X8Str(x, y, s_dat, fc, pc);
    else if (size == 16)
        TFT2SPI_P8X8Str(x, y, s_dat, fc, pc);
    else if (size == 24)
        TFT2SPI_P8X16Str(x, y, s_dat, fc, pc);
    else if (size == 32)
        TFT2SPI_P8X16Str(x, y, s_dat, fc, pc);
}

/////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////以下部分为功能测试/////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
@函数名称：void Test_TFT2(void);
@功能说明：TFT2.0屏幕测试
@参数说明：无
@函数返回：无
@备    注：开发板上TFT显示屏接口
QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ*/
void Test_TFT2(void)
{
    GPIO_LED_Init();
    TFT2SPI_Init();                                                                  // LCD初始化  0:横屏  1：竖屏
    TFT2SPI_CLS(U16_BLUE);                                                           // 蓝色屏幕
    TFT2SPI_Show_Logo(0, 37);                                                        // 显示龙邱LOGO
    TFT2SPI_P16x16Str(0, 0, (unsigned char *)"北京龙邱智能科技", U16_RED, U16_BLUE); // 字符串显示
    TFT2SPI_P8X16Str(0, 1, "Long Qiu i.s.t.", U16_WHITE, U16_BLACK);                 // 字符串显示
    Delay_Ms(1000);                                                                  // 延时等待
    char txt[32];
    unsigned short count = 1;
    while (1)
    {
        sprintf(txt, "variate:%05d", count);            // 将变量填充到字符串的对应位置，并将字符串存放到txt[]中
        TFT2SPI_P8X16Str(0, 6, txt, U16_RED, U16_BLUE); // 将txt中 内容显示出来
        LED_Ctrl(LED0, RVS);                            // 电平翻转,LED闪烁
        Delay_Ms(500);                                  // 延时等待
        count++;
    }
} // TEST()
